using Google.ProtocolBuffers;
using micromsg.Proto;
using System;
using System.CodeDom.Compiler;
using System.Diagnostics;
using System.IO;
using System.Runtime.CompilerServices;
namespace micromsg
{
	[GeneratedCode("ProtoGen", "2.3.0.277"), DebuggerNonUserCode, CompilerGenerated]
	public sealed class GetUserNameResponse : GeneratedMessageLite<GetUserNameResponse, GetUserNameResponse.Builder>
	{
		[GeneratedCode("ProtoGen", "2.3.0.277"), DebuggerNonUserCode, CompilerGenerated]
		public sealed class Builder : GeneratedBuilderLite<GetUserNameResponse, GetUserNameResponse.Builder>
		{
			private bool resultIsReadOnly;
			private GetUserNameResponse result;
			protected override GetUserNameResponse.Builder ThisBuilder
			{
				get
				{
					return this;
				}
			}
			public override bool IsInitialized
			{
				get
				{
					return this.result.IsInitialized;
				}
			}
			protected override GetUserNameResponse MessageBeingBuilt
			{
				get
				{
					return this.PrepareBuilder();
				}
			}
			public override GetUserNameResponse DefaultInstanceForType
			{
				get
				{
					return GetUserNameResponse.DefaultInstance;
				}
			}
			public BaseResponse BaseResponse
			{
				get
				{
					return this.result.BaseResponse;
				}
				set
				{
					this.SetBaseResponse(value);
				}
			}
			public string UserName
			{
				get
				{
					return this.result.UserName;
				}
				set
				{
					this.SetUserName(value);
				}
			}
			public string Ticket
			{
				get
				{
					return this.result.Ticket;
				}
				set
				{
					this.SetTicket(value);
				}
			}
			public Builder()
			{
				this.result = GetUserNameResponse.DefaultInstance;
				this.resultIsReadOnly = true;
			}
			internal Builder(GetUserNameResponse cloneFrom)
			{
				this.result = cloneFrom;
				this.resultIsReadOnly = true;
			}
			private GetUserNameResponse PrepareBuilder()
			{
				if (this.resultIsReadOnly)
				{
					GetUserNameResponse other = this.result;
					this.result = new GetUserNameResponse();
					this.resultIsReadOnly = false;
					this.MergeFrom(other);
				}
				return this.result;
			}
			public override GetUserNameResponse.Builder Clear()
			{
				this.result = GetUserNameResponse.DefaultInstance;
				this.resultIsReadOnly = true;
				return this;
			}
			public override GetUserNameResponse.Builder Clone()
			{
				if (this.resultIsReadOnly)
				{
					return new GetUserNameResponse.Builder(this.result);
				}
				return new GetUserNameResponse.Builder().MergeFrom(this.result);
			}
			public override GetUserNameResponse BuildPartial()
			{
				if (this.resultIsReadOnly)
				{
					return this.result;
				}
				this.resultIsReadOnly = true;
				return this.result.MakeReadOnly();
			}
			public override GetUserNameResponse.Builder MergeFrom(IMessageLite other)
			{
				if (other is GetUserNameResponse)
				{
					return this.MergeFrom((GetUserNameResponse)other);
				}
				base.MergeFrom(other);
				return this;
			}
			public override GetUserNameResponse.Builder MergeFrom(GetUserNameResponse other)
			{
				return this;
			}
			public override GetUserNameResponse.Builder MergeFrom(ICodedInputStream input)
			{
				return this.MergeFrom(input, ExtensionRegistry.Empty);
			}
			public override GetUserNameResponse.Builder MergeFrom(ICodedInputStream input, ExtensionRegistry extensionRegistry)
			{
				this.PrepareBuilder();
				uint num;
				string text;
				while (input.ReadTag(out num, out text))
				{
					if (num == 0u && text != null)
					{
						int num2 = Array.BinarySearch<string>(GetUserNameResponse._getUserNameResponseFieldNames, text, StringComparer.get_Ordinal());
						if (num2 < 0)
						{
							this.ParseUnknownField(input, extensionRegistry, num, text);
							continue;
						}
						num = GetUserNameResponse._getUserNameResponseFieldTags[num2];
					}
					uint num3 = num;
					if (num3 <= 10u)
					{
						if (num3 == 0u)
						{
							throw InvalidProtocolBufferException.InvalidTag();
						}
						if (num3 == 10u)
						{
							BaseResponse.Builder builder = BaseResponse.CreateBuilder();
							if (this.result.hasBaseResponse)
							{
								builder.MergeFrom(this.BaseResponse);
							}
							input.ReadMessage(builder, extensionRegistry);
							this.BaseResponse = builder.BuildPartial();
							continue;
						}
					}
					else
					{
						if (num3 == 18u)
						{
							this.result.hasUserName = input.ReadString(ref this.result.userName_);
							continue;
						}
						if (num3 == 26u)
						{
							this.result.hasTicket = input.ReadString(ref this.result.ticket_);
							continue;
						}
					}
					if (WireFormat.IsEndGroupTag(num))
					{
						return this;
					}
					this.ParseUnknownField(input, extensionRegistry, num, text);
				}
				return this;
			}
			public GetUserNameResponse.Builder SetBaseResponse(BaseResponse value)
			{
				ThrowHelper.ThrowIfNull(value, "value");
				this.PrepareBuilder();
				this.result.hasBaseResponse = true;
				this.result.baseResponse_ = value;
				return this;
			}
			public GetUserNameResponse.Builder SetBaseResponse(BaseResponse.Builder builderForValue)
			{
				ThrowHelper.ThrowIfNull(builderForValue, "builderForValue");
				this.PrepareBuilder();
				this.result.hasBaseResponse = true;
				this.result.baseResponse_ = builderForValue.Build();
				return this;
			}
			public GetUserNameResponse.Builder MergeBaseResponse(BaseResponse value)
			{
				ThrowHelper.ThrowIfNull(value, "value");
				this.PrepareBuilder();
				if (this.result.hasBaseResponse && this.result.baseResponse_ != BaseResponse.DefaultInstance)
				{
					this.result.baseResponse_ = BaseResponse.CreateBuilder(this.result.baseResponse_).MergeFrom(value).BuildPartial();
				}
				else
				{
					this.result.baseResponse_ = value;
				}
				this.result.hasBaseResponse = true;
				return this;
			}
			public GetUserNameResponse.Builder ClearBaseResponse()
			{
				this.PrepareBuilder();
				this.result.hasBaseResponse = false;
				this.result.baseResponse_ = null;
				return this;
			}
			public GetUserNameResponse.Builder SetUserName(string value)
			{
				ThrowHelper.ThrowIfNull(value, "value");
				this.PrepareBuilder();
				this.result.hasUserName = true;
				this.result.userName_ = value;
				return this;
			}
			public GetUserNameResponse.Builder ClearUserName()
			{
				this.PrepareBuilder();
				this.result.hasUserName = false;
				this.result.userName_ = "";
				return this;
			}
			public GetUserNameResponse.Builder SetTicket(string value)
			{
				ThrowHelper.ThrowIfNull(value, "value");
				this.PrepareBuilder();
				this.result.hasTicket = true;
				this.result.ticket_ = value;
				return this;
			}
			public GetUserNameResponse.Builder ClearTicket()
			{
				this.PrepareBuilder();
				this.result.hasTicket = false;
				this.result.ticket_ = "";
				return this;
			}
		}
		public const int BaseResponseFieldNumber = 1;
		public const int UserNameFieldNumber = 2;
		public const int TicketFieldNumber = 3;
		private static readonly GetUserNameResponse defaultInstance;
		private static readonly string[] _getUserNameResponseFieldNames;
		private static readonly uint[] _getUserNameResponseFieldTags;
		private bool hasBaseResponse;
		private BaseResponse baseResponse_;
		private bool hasUserName;
		private string userName_ = "";
		private bool hasTicket;
		private string ticket_ = "";
		private int memoizedSerializedSize = -1;
		public static GetUserNameResponse DefaultInstance
		{
			get
			{
				return GetUserNameResponse.defaultInstance;
			}
		}
		public override GetUserNameResponse DefaultInstanceForType
		{
			get
			{
				return GetUserNameResponse.DefaultInstance;
			}
		}
		protected override GetUserNameResponse ThisMessage
		{
			get
			{
				return this;
			}
		}
		public BaseResponse BaseResponse
		{
			get
			{
				return this.baseResponse_ ?? BaseResponse.DefaultInstance;
			}
		}
		public string UserName
		{
			get
			{
				return this.userName_;
			}
		}
		public string Ticket
		{
			get
			{
				return this.ticket_;
			}
		}
		public override bool IsInitialized
		{
			get
			{
				return this.hasBaseResponse && this.BaseResponse.IsInitialized;
			}
		}
		public override int SerializedSize
		{
			get
			{
				int num = this.memoizedSerializedSize;
				if (num != -1)
				{
					return num;
				}
				num = 0;
				if (this.hasBaseResponse)
				{
					num += CodedOutputStream.ComputeMessageSize(1, this.BaseResponse);
				}
				if (this.hasUserName)
				{
					num += CodedOutputStream.ComputeStringSize(2, this.UserName);
				}
				if (this.hasTicket)
				{
					num += CodedOutputStream.ComputeStringSize(3, this.Ticket);
				}
				this.memoizedSerializedSize = num;
				return num;
			}
		}
		private GetUserNameResponse()
		{
		}
		public override void WriteTo(ICodedOutputStream output)
		{
			int arg_06_0 = this.SerializedSize;
			string[] getUserNameResponseFieldNames = GetUserNameResponse._getUserNameResponseFieldNames;
			if (this.hasBaseResponse)
			{
				output.WriteMessage(1, getUserNameResponseFieldNames[0], this.BaseResponse);
			}
			if (this.hasUserName)
			{
				output.WriteString(2, getUserNameResponseFieldNames[2], this.UserName);
			}
			if (this.hasTicket)
			{
				output.WriteString(3, getUserNameResponseFieldNames[1], this.Ticket);
			}
		}
		public override int GetHashCode()
		{
			int num = base.GetType().GetHashCode();
			if (this.hasBaseResponse)
			{
				num ^= this.baseResponse_.GetHashCode();
			}
			if (this.hasUserName)
			{
				num ^= this.userName_.GetHashCode();
			}
			if (this.hasTicket)
			{
				num ^= this.ticket_.GetHashCode();
			}
			return num;
		}
		public override bool Equals(object value)
		{
			GetUserNameResponse getUserNameResponse = value as GetUserNameResponse;
			return getUserNameResponse != null && (this.hasBaseResponse == getUserNameResponse.hasBaseResponse && (!this.hasBaseResponse || this.baseResponse_.Equals(getUserNameResponse.baseResponse_))) && (this.hasUserName == getUserNameResponse.hasUserName && (!this.hasUserName || this.userName_.Equals(getUserNameResponse.userName_))) && (this.hasTicket == getUserNameResponse.hasTicket && (!this.hasTicket || this.ticket_.Equals(getUserNameResponse.ticket_)));
		}
		public override void PrintTo(TextWriter writer)
		{
			GeneratedMessageLite<GetUserNameResponse, GetUserNameResponse.Builder>.PrintField("BaseResponse", this.hasBaseResponse, this.baseResponse_, writer);
			GeneratedMessageLite<GetUserNameResponse, GetUserNameResponse.Builder>.PrintField("UserName", this.hasUserName, this.userName_, writer);
			GeneratedMessageLite<GetUserNameResponse, GetUserNameResponse.Builder>.PrintField("Ticket", this.hasTicket, this.ticket_, writer);
		}
		public static GetUserNameResponse ParseFrom(byte[] data)
		{
			return GetUserNameResponse.CreateBuilder().MergeFrom(data).BuildParsed();
		}
		private GetUserNameResponse MakeReadOnly()
		{
			return this;
		}
		public static GetUserNameResponse.Builder CreateBuilder()
		{
			return new GetUserNameResponse.Builder();
		}
		public override GetUserNameResponse.Builder ToBuilder()
		{
			return GetUserNameResponse.CreateBuilder(this);
		}
		public override GetUserNameResponse.Builder CreateBuilderForType()
		{
			return new GetUserNameResponse.Builder();
		}
		public static GetUserNameResponse.Builder CreateBuilder(GetUserNameResponse prototype)
		{
			return new GetUserNameResponse.Builder(prototype);
		}
		static GetUserNameResponse()
		{
			GetUserNameResponse.defaultInstance = new GetUserNameResponse().MakeReadOnly();
			GetUserNameResponse._getUserNameResponseFieldNames = new string[]
			{
				"BaseResponse",
				"Ticket",
				"UserName"
			};
			GetUserNameResponse._getUserNameResponseFieldTags = new uint[]
			{
				10u,
				26u,
				18u
			};
			object.ReferenceEquals(micromsg.Proto.GetUserNameResponse.Descriptor, null);
		}
	}
}
